package model_sys

import "wrblog-api-go/app/model"

type SysRole struct {
	RoleId            int    `json:"roleId" form:"roleId" gorm:"primaryKey;autoIncrement"` //角色id
	RoleName          string `json:"roleName" form:"roleName" gorm:"required"`             //角色名称
	RoleKey           string `json:"roleKey" form:"roleKey" gorm:"required"`               //角色标识
	RoleSort          int    `json:"roleSort" form:"roleSort" gorm:"required"`             //角色排序
	DataScope         string `json:"dataScope" form:"dataScope" gorm:"required"`           //数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）
	MenuCheckStrictly int    `json:"menuCheckStrictly" form:"menuCheckStrictly"`           //菜单树选择项是否关联显示
	DeptCheckStrictly int    `json:"deptCheckStrictly" form:"deptCheckStrictly"`           //部门树选择项是否关联显示
	Status            string `json:"status" form:"status" gorm:"required"`                 //状态
}

type SysRolePo struct {
	SysRole
	model.BaseEntity
}

func (SysRolePo) TableName() string {
	return "sys_role"
}

type SelectSysRole struct {
	RoleName string `json:"roleName" form:"roleName"` //角色名称
	RoleKey  string `json:"roleKey" form:"roleKey"`   //角色标识
	Status   string `json:"status" form:"status"`     //状态
	model.SelectBaseEntity
}

type SysRoleVo struct {
	SysRole
	model.BaseEntityVo
}
